
import Vue from 'vue';
import Router from 'vue-router';
Vue.use(Router);
/* Layout */
import Layout from '@/layout';
/* Router Modules */
/**
 * Note: sub-menu only appear when route children.length >= 1
 * Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
 *
 * hidden: true                   if set true, item will not show in the sidebar(default is false)
 * alwaysShow: true               if set true, will always show the root menu
 *                                if not set alwaysShow, when item has more than one children route,
 *                                it will becomes nested mode, otherwise not show the root menu
 * redirect: noRedirect           if set noRedirect will no redirect in the breadcrumb
 * name:'router-name'             the name is used by <keep-alive> (must set!!!)
 * meta : {
    roles: ['admin','editor']    control the page roles (you can set multiple roles)
    title: 'title'               the name show in sidebar and breadcrumb (recommend set)
    icon: 'svg-name'             the icon show in the sidebar
    noCache: true                if set true, the page will no be cached(default is false)
    affix: true                  if set true, the tag will affix in the tags-view
    breadcrumb: false            if set false, the item will hidden in breadcrumb(default is true)
    activeMenu: '/example/list'  if set path, the sidebar will highlight the path you set
  }
 */
/**
 * constantRoutes
 * a base page that does not have permission requirements
 * all roles can be accessed
 */
export const constantRoutes = [
    {
        path: '/redirect',
        component: Layout,
        hidden: true,
        children: [
            {
                path: '/redirect/:path*',
                component: () => import('@/views/redirect/index')
            }
        ]
    },
    {
        path: '/login',
        component: () => import('@/views/login/index'),
        hidden: true
    },
    {
        path: '/auth-redirect',
        component: () => import('@/views/login/auth-redirect'),
        hidden: true
    },
    {
        path: '/details',
        name: 'detailPage',
        component: () => import('@/views/report/details'),
        hidden: true
    },
    {
        path: '/detailsKpi',
        name: 'DetailKpi',
        component: () => import('@/views/report/qualityKpi/details'),
        hidden: true
    },
    {
        path: '/404',
        component: () => import('@/views/error-page/404'),
        hidden: true
    },
    {
        path: '/publish',
        component: () => import('@/components/Publish/publish'),
        hidden: true
    },
    {
        path: '/CarSupplement',
        name: 'CarSupplement',
        component: () => import('@/views/data/carDispose/carSupplement/'),
        hidden: true
    },
    // {
    //   path: '/help',
    //   component: () => import('@/components/Help/help'),
    //   hidden: true
    // },
    {
        path: '/feedback',
        component: () => import('@/components/Feedback/feedback'),
        hidden: true
    },
    {
        path: '/401',
        component: () => import('@/views/error-page/401'),
        hidden: true
    },
    {
        path: '/noauth',
        component: () => import('@/views/data/noAuth'),
        hidden: true
    },
    {
        path: '/',
        component: Layout,
        redirect: '/dashboard',
        children: [
            {
                path: 'dashboard',
                component: () => import('@/views/dashboard/index'),
                name: 'Dashboard',
                meta: { title: '首页', icon: 'dashboard', affix: true }
            }
        ]
    },
    {
        path: '/profile',
        component: Layout,
        redirect: '/profile/index',
        children: [
            {
                path: 'workindex',
                component: () => import('@/views/profile/index'),
                name: 'Profile',
                meta: { title: '工作台', icon: 'user', noCache: true }
            }
        ]
    },
    // {
    //     path: '/project_kanban',
    //     component: Layout,
    //     redirect: 'noRedirect', // noRedirect
    //     name: 'projectKanban',
    //     meta: {
    //         title: '工程看板',
    //         icon: 'nested'
    //     },
    //     children: [
    //         {
    //             path: 'tinymce',
    //             component: () => import('@/views/qa/RequireImplement'),
    //             name: 'TinymceDemo',
    //             meta: { title: '需求实现' }
    //         },
    //         {
    //             path: 'code-check',
    //             component: () => import('@/views/devops/codecheck'),
    //             name: 'codecheck',
    //             meta: { title: '代码检查' }
    //         },
    //         {
    //             path: 'gerrit-review',
    //             component: () => import('@/views/qa/GerritReview'),
    //             name: 'gerritreview',
    //             meta: { title: '代码评审' }
    //         },
    //         {
    //             path: 'gerrit-review-detail',
    //             name: 'gerritreviewdetail',
    //             component: () => import('@/views/qa/GerritReviewDetail.vue'),
    //             meta: { title: '代码评审无行内注释详情' }
    //         },
    //         {
    //             path: 'test-datas',
    //             name: 'InternetThings2',
    //             component: () => import('@/views/sys/internetThings'),
    //             meta: { title: '智能物联网项目' },
    //             hidden: true
    //         },
    //         {
    //             path: 'build',
    //             component: () => import('@/views/devops/buildinfo'),
    //             name: 'build',
    //             meta: { title: '版本构建' }
    //         },
    //         {
    //             path: 'release',
    //             component: () => import('@/views/devops/release'),
    //             name: 'release',
    //             meta: { title: '版本发布' }
    //         },
    //         {
    //             path: 'build-load',
    //             component: () => import('@/views/qa/configManage'),
    //             name: 'buildLoad',
    //             meta: { title: '系统资源看板(构建负载)' }
    //         },
    //         {
    //             path: 'pipeline',
    //             component: () => import('@/views/devops/pipeline'),
    //             name: 'pipeline',
    //             meta: { title: '持续交付流水线' }
    //         }
    //     ],
    // },
    {
        path: '/project',
        component: Layout,
        redirect: 'noRedirect', // noRedirect
        name: 'project',
        meta: {
            title: '工程看板',
            icon: 'component'
        },
        children: [
            {
                path: 'index',
                component: () => import('@/views/Department2'),
                name: 'indexDemo',
                meta: { title: '项目汇总' }
            },
            {
                path: 'tinymce',
                component: () => import('@/views/qa/RequireImplement'),
                name: 'TinymceDemo',
                meta: { title: '需求实现' }
            },
            {
                path: 'code-check',
                component: () => import('@/views/devops/codecheck'),
                name: 'codecheck',
                meta: { title: '代码检查' }
            },
            {
                path: 'gerrit-review',
                component: () => import('@/views/qa/GerritReview'),
                name: 'gerritreview',
                meta: { title: '代码评审' }
            },
            {
                path: 'gerrit-review-detail',
                name: 'gerritreviewdetail',
                component: () => import('@/views/qa/GerritReviewDetail.vue'),
                meta: { title: '代码评审无行内注释详情' }
            },
            {
                path: 'test-datas',
                name: 'InternetThings2',
                component: () => import('@/views/sys/internetThings'),
                meta: { title: '智能物联网项目' },
                hidden: true
            },
            // {
            //   path: 'devops',
            //   component: () => import('@/views/route'),
            //   name: 'devops',
            //   redirect: '/devops/route',
            //   meta: { title: '持续集成' },
            //   children: [
            //   ]
            // },
            // {
            //   path: 'auto-test',
            //   component: () => import('@/views/devops/autotest'),
            //   name: 'autotest',
            //   meta: { title: '自动化测试' }
            // },
            {
                path: 'build',
                component: () => import('@/views/devops/buildinfo'),
                name: 'build',
                meta: { title: '版本构建' }
            },
            {
                path: 'release',
                component: () => import('@/views/devops/release'),
                name: 'release',
                meta: { title: '版本发布' }
            },
            {
                path: 'details/:pmsProjectId/:proj_date',
                name: 'detail_page',
                component: () => import('@/views/devops/detail_page.vue'),
                hidden: true
            },
            // {
            //   path: 'devops',
            //   component: () => import('@/views/route'),
            //   name: 'devops',
            //   redirect: '/devops/route',
            //   meta: { title: '持续集成' },
            //   children: [
            //   ]
            // },
            {
                path: 'json-editor',
                component: () => import('@/views/devops/autotest'),
                name: 'JsonEditorDemo',
                meta: { title: '测试验证' }
            },
            {
                path: 'split-pane',
                component: () => import('@/views/qa/DefectReview'),
                name: 'SplitpaneDemo',
                meta: { title: '缺陷处理' }
            },
            {
                path: 'build-load',
                component: () => import('@/views/qa/configManage'),
                name: 'buildLoad',
                meta: { title: '系统资源看板(构建负载)' }
            },
            {
                path: 'pipeline',
                component: () => import('@/views/devops/pipeline'),
                name: 'pipeline',
                meta: { title: '持续交付流水线' }
            },
            {
                path: 'continuous-delivery',
                component: () => import('@/views/delivery'),
                name: 'continuous',
                meta: { title: '持续交付KPI看板' }
            },
            {
                path: 'deliver',
                name: 'deliver',
                component: () => import('@/views/data/deliver'),
                meta: { title: '持续交付KPI配置' },
                hidden: true
            },
            {
                path: 'report',
                name: 'report',
                component: () => import('@/views/report/report'),
                meta: { title: '持续交付月报' }
            },
            // {
            //     path: 'avatar-upload',
            //     component: () => import('@/views/qa/PeriodReview'),
            //     name: 'AvatarUploadDemo',
            //     meta: { title: '阶段点评审' }
            // },
            // {
            //     path: 'avatar-complaint',
            //     component: () => import('@/views/qa/CustomerComplaint'),
            //     name: 'ComplaintDemo',
            //     meta: { title: '客户投诉' }
            // },
            // {
            //     path: 'pipeline',
            //     component: () => import('@/views/devops/pipeline'),
            //     name: 'pipeline',
            //     meta: { title: '持续交付流水线' }
            // }
        ]
    },
    {
        path: '/qa_kanban',
        component: Layout,
        redirect: 'noRedirect', // noRedirect
        name: 'qa_kanban',
        meta: {
            title: '质量看板',
            icon: 'table'
        },
        children: [
            {
                path: 'quality-kpi',
                component: () => import('@/views/kpi/kpi'),
                name: 'qualityKpi',
                meta: { title: '质量KPI看板' }
            },
            {
                path: 'reportKpi',
                name: 'ReportKpi',
                component: () => import('@/views/report/qualityKpi/report'),
                meta: { title: '质量KPI月报' }
            },
            {
                path: 'avatar-complaint',
                component: () => import('@/views/qa/CustomerComplaint'),
                name: 'ComplaintDemo',
                meta: { title: '客户投诉' }
            },
            {
                path: 'avatar-upload',
                component: () => import('@/views/qa/PeriodReview'),
                name: 'AvatarUploadDemo',
                meta: { title: '阶段点评审' }
            },
            {
                path: 'continuous-score',
                component: () => import('@/views/kpi/ContinuousScore'),
                name: 'ContinuousScore',
                meta: { title: '持续改进看板' }
            },
            {
                path: 'mark',
                name: 'mark',
                component: () => import('@/views/data/mark'),
                meta: { title: '质量KPI' },
                hidden: true
            },
            {
                path: 'datas',
                name: 'datas',
                component: () => import('@/views/supplement'),
                meta: { title: '质量KPI' },
                hidden: true
            },
        ],
    },
    {
        path: '/car',
        component: Layout,
        name: 'quality',
        alwaysShow: true,
        redirect: 'noRedirect',
        meta: { title: '智能汽车', icon: 'edit' },
        children: [
            {
                path: 'ai-car',
                component: () => import('@/views/sys/Index'),
                name: 'ai-car',
                redirect: '/ai-car/Index',
                alwaysShow: true,
                meta: { title: '交付管理' },
                children: [
                    {
                        path: 'car-show',
                        component: () =>import('@/views/data/carDispose/carShow/'),
                        name: 'CarShow',
                        meta: { title: '项目管理看板' }
                    },
                    {
                        path: 'car-paper',
                        component: () => import('@/views/data/carPaper/index'),
                        name: 'CarPaper',
                        meta: { title: '项目管理周报' }
                    },
                    {
                        path: 'CarPaperDetails',
                        component: () =>
                            import('@/views/data/carPaper/details'),
                        name: 'CarPaperDetails',
                        hidden: true
                    },
                    {
                        path: 'highlight-forms',
                        component: () => import('@/views/data/highlightForms'),
                        name: 'highlightforms',
                        meta: { title: '风险Highlight报表' }
                    },
                    {
                        path: 'quality-risk',
                        component: () => import('@/views/data/qualityRisk'),
                        name: 'qualityrisk',
                        meta: { title: '质量风险趋势图' }
                    },
                    {
                        path: 'carPermission',
                        name: 'carPermission',
                        component: () =>
                          import('@/views/data/carDispose/carPermission/'),
                        meta: { title: '汽车管理看板权限配置' },
                        hidden: true
                    },
                    {
                        path: 'carDispose',
                        name: 'Dispose',
                        component: () =>
                            import('@/views/data/carDispose/index'),
                        meta: { title: '汽车管理看板配置' },
                        hidden: true
                    },
                ]
            },
            {
                path: 'roll-forecast',
                component: () => import('@/views/sys/Index'),
                name: 'roll-forecast',
                redirect: 'noRedirect',
                alwaysShow: true,
                meta: { title: '滚动预测' },
                children: [
                    {
                        path: 'car-predictions',
                        component: () =>import('@/views/data/carPredictions/index'),
                        name: 'CarPredictions',
                        meta: { title: '滚动预测' }
                    },
                    {
                        path: 'predictionsForms',
                        component: () =>import('@/views/data/carPredictions/predictionsForms'),
                        name: 'PredictionsForms',
                        meta: { title: '滚动预测报表' }
                    },
                    // {
                    //     path: 'carPermission',
                    //     name: 'carPermission',
                    //     component: () =>
                    //         import('@/views/data/carDispose/carPermission/'),
                    //     meta: { title: '汽车管理看板权限配置' },
                    //     hidden: true
                    // },
                ]
            },
            {
                path: 'recourse-manage',
                component: () => import('@/views/sys/Index'),
                name: 'recourse-manage',
                redirect: 'noRedirect',
                alwaysShow: true,
                meta: { title: '资源管理' },
                children: [
                    {
                        path: 'resourceForecastg',
                        component: () => import('@/views/resourceManage/indexg'),
                        name: 'resourceForecastg',
                        meta: { title: '资源预测', noCache: true }
                    },
                    {
                        path: 'workingHourCheck',
                        component: () => import('@/views/resourceManage/workingHourCheck'),
                        name: 'workingHourCheck',
                        meta: { title: '当月工时确认', noCache: true }
                    },
                    // {
                    //     path: 'projectManageKB',
                    //     component: () => import('@/views/resourceManage/projectManageKB'),
                    //     name: 'projectManageKB',
                    //     meta: { title: '项目资源看板', noCache: true }
                    // },
                    {
                        path: 'checkPeopleForm',
                        component: () => import('@/views/resourceManage/checkPeopleForm'),
                        name: 'checkPeopleForm',
                        meta: { title: '人员信息查询', noCache: true }
                    },
                    {
                        path: 'talentReview',
                        component: () => import('@/views/resourceManage/talentReviewCar'),
                        name: 'talentReview',
                        meta: { title: '人员盘点', noCache: true }
                    },
                    // {
                    //     path: 'resourceRequirement',
                    //     component: () => import('@/views/resourceManage/resourceRequirement'),
                    //     name: 'resourceRequirement',
                    //     meta: { title: '资源需求', noCache: true }
                    // },
                    // {
                    //     path: 'carForms',
                    //     component: () => import('@/views/resourceManage/resourceForm'),
                    //     name: 'resourceForm',
                    //     meta: { title: '资源报表', noCache: true }
                    // },
                    {
                        path: 'resourceAdd/:id',
                        component: () =>
                            import('@/views/resourceManage/resourceMain'),
                        name: 'resourceAdd'
                    },
                ]
            },
            {
                path: 'over-warning',
                component: () => import('@/views/sys/Index'),
                name: 'over-warning',
                redirect: 'noRedirect',
                alwaysShow: true,
                meta: { title: '超投预警' },
                children: [
                    {
                        path: 'over-workinghour',
                        component: () => import('@/views/report/workinghour'),
                        name: 'over-workinghour',
                        meta: { title: '项目超投预警', noCache: true }
                    },
                ]
            }
        ],

    },
    {
        path: '/internet-things',
        name: 'internet-things',
        component: Layout,
        meta: { title: '智能物联网', icon: 'form' },
        alwaysShow: true,
        children: [
            {
                path: 'test-content',
                component: () => import('@/views/sys/internetThings'),
                name: 'InternetThings',
                meta: { title: '测试复盘看板' }
            },
            {
                path: 'project-customization',
                component: () =>
                  import('@/views/sys/projectCustomization'),
                name: 'ProjectCustomization',
                meta: { title: '项目定制看板' }
            }
        ]
    },
    // {
    //     path: '/quality',
    //     component: Layout,
    //     name: 'quality',
    //     alwaysShow: true,
    //     redirect: 'noRedirect',
    //     meta: { title: '组织看板', icon: 'table' },
    //     children: [
            // {
            //     path: 'ai-car',
            //     component: () => import('@/views/sys/Index'),
            //     name: 'ai-car',
            //     redirect: '/ai-car/Index',
            //     alwaysShow: true,
            //     meta: { title: '智能汽车' },
            //     children: [
            //         {
            //             path: 'car-show',
            //             component: () => import('@/views/data/carDispose/carShow/'),
            //             name: 'CarShow',
            //             meta: { title: '项目管理看板' }
            //         },
            //         {
            //             path: 'car-paper',
            //             component: () => import('@/views/data/carPaper/index'),
            //             name: 'CarPaper',
            //             meta: { title: '项目管理周报' }
            //         },
            //         {
            //             path: 'CarPaperDetails',
            //             component: () =>
            //                 import('@/views/data/carPaper/details'),
            //             name: 'CarPaperDetails',
            //             hidden: true
            //         },
            //         {
            //             path: 'car-predictions',
            //             component: () =>
            //                 import('@/views/data/carPredictions/index'),
            //             name: 'CarPredictions',
            //             meta: { title: '滚动预测' }
            //         },
            //         {
            //             path: 'predictionsForms',
            //             component: () =>
            //                 import('@/views/data/carPredictions/predictionsForms'),
            //             name: 'PredictionsForms',
            //             meta: { title: '滚动预测报表' }
            //         },
            //         {
            //             path: 'carPermission',
            //             name: 'carPermission',
            //             component: () =>
            //                 import('@/views/data/carDispose/carPermission/'),
            //             meta: { title: '汽车管理看板权限配置' },
            //             hidden: true
            //         },
            //         {
            //             path: 'carDispose',
            //             name: 'Dispose',
            //             component: () =>
            //                 import('@/views/data/carDispose/index'),
            //             meta: { title: '汽车管理看板配置' },
            //             hidden: true
            //         },
            //         {
            //             path: 'code-query',
            //             component: () => import('@/views/sys/Manifest'),
            //             name: 'codeQuery',
            //             meta: { title: '平台代码库查询' }
            //         },
            //         {
            //             path: 'platdefect-statis',
            //             component: () => import('@/views/sys/platdefect'),
            //             name: 'platstatis',
            //             meta: { title: '平台研发看板' }
            //         },
            //         {
            //             path: 'quality-risk',
            //             component: () => import('@/views/data/qualityRisk'),
            //             name: 'qualityrisk',
            //             meta: { title: '质量风险趋势图' }
            //         },
            //         {
            //             path: 'highlight-forms',
            //             component: () => import('@/views/data/highlightForms'),
            //             name: 'highlightforms',
            //             meta: { title: '风险Highlight报表' }
            //         }
            //     ]
            // },
            // {
            //     path: 'internet-things',
            //     name: 'internet-things',
            //     component: () => import('@/views/sys/Index'),
            //     meta: { title: '智能物联网' },
            //     alwaysShow: true,
            //     children: [
            //         {
            //             path: 'test-content',
            //             component: () => import('@/views/sys/internetThings'),
            //             name: 'InternetThings',
            //             meta: { title: '测试复盘看板' }
            //         },
            //         {
            //             path: 'project-customization',
            //             component: () =>
            //                 import('@/views/sys/projectCustomization'),
            //             name: 'ProjectCustomization',
            //             meta: { title: '项目定制看板' }
            //         }
            //     ]
            // },
            // {
            //     path: 'config-manage',
            //     component: () => import('@/views/qa/Index'),
            //     name: 'config-manage',
            //     redirect: '/config-manage/Index',
            //     meta: { title: '质量管理' },
            //     isNest: true,
            //     children: [
                    // {
                    //     path: 'quality-kpi',
                    //     component: () => import('@/views/kpi/kpi'),
                    //     name: 'qualityKpi',
                    //     meta: { title: '质量KPI看板' }
                    // },
                    // {
                    //     path: 'continuous-score',
                    //     component: () => import('@/views/kpi/ContinuousScore'),
                    //     name: 'ContinuousScore',
                    //     meta: { title: '持续改进积分看板' }
                    // },
                    // {
                    //     path: 'mark',
                    //     name: 'mark',
                    //     component: () => import('@/views/data/mark'),
                    //     meta: { title: '质量KPI' },
                    //     hidden: true
                    // },
                    // {
                    //     path: 'datas',
                    //     name: 'datas',
                    //     component: () => import('@/views/supplement'),
                    //     meta: { title: '质量KPI' },
                    //     hidden: true
                    // },
                    // {
                    //     path: 'continuous-delivery',
                    //     component: () => import('@/views/delivery'),
                    //     name: 'continuous',
                    //     meta: { title: '持续交付KPI看板' }
                    // },
                    // {
                    //     path: 'deliver',
                    //     name: 'deliver',
                    //     component: () => import('@/views/data/deliver'),
                    //     meta: { title: '持续交付KPI配置' },
                    //     hidden: true
                    // },
                    // {
                    //     path: 'build-load',
                    //     component: () => import('@/views/qa/configManage'),
                    //     name: 'buildLoad',
                    //     meta: { title: '构建负载查询' }
                    // }
            //     ]
            // }
        // ]
    // },
    // {
    //     path: '/sysconfig',
    //     component: Layout,
    //     redirect: 'noRedirect',
    //     name: 'Example',
    //     alwaysShow: true,
    //     meta: {
    //         title: '定制看板',
    //         icon: 'example'
    //     },
    //     children: [
    //         {
    //             path: 'mac',
    //             name: 'mac',
    //             component: () => import('@/views/sys/Mac'),
    //             meta: { title: '京瓷' }
    //         }
    //     ]
    //     // children: [
    //     //     {
    //     //         path: 'ai-car',
    //     //         component: () =>
    //     //             import ('@/views/sys/Index'),
    //     //         name: 'ai-car',
    //     //         redirect: '/ai-car/Index',
    //     //         alwaysShow: true,
    //     //         meta: { title: '智能汽车' },
    //     //         children: [{
    //     //                 path: 'code-query',
    //     //                 component: () =>
    //     //                     import ('@/views/sys/Manifest'),
    //     //                 name: 'codeQuery',
    //     //                 meta: { title: '平台代码库查询' }
    //     //             },
    //     //             {
    //     //                 path: 'platdefect-statis',
    //     //                 component: () =>
    //     //                     import ('@/views/sys/platdefect'),
    //     //                 name: 'platstatis',
    //     //                 meta: { title: '平台看板' }
    //     //             }
    //     //         ]
    //     //     },
    //     //     {
    //     //         path: 'internet-things',
    //     //         name: 'internet-things',
    //     //         component: () =>
    //     //             import ('@/views/sys/Index'),
    //     //         meta: { title: '智能物联网' },
    //     //         alwaysShow: true,
    //     //         children: [{
    //     //             path: 'test-content',
    //     //             component: () =>
    //     //                 import ('@/views/sys/internetThings'),
    //     //             name: 'InternetThings',
    //     //             meta: { title: '测试复盘看板' }
    //     //         }, ]
    //     //     },
    //     //     {
    //     //         path: 'config-manage',
    //     //         component: () =>
    //     //             import ('@/views/qa/Index'),
    //     //         name: 'config-manage',
    //     //         redirect: '/config-manage/Index',
    //     //         meta: { title: '配置管理' },
    //     //         isNest: true,
    //     //         children: [{
    //     //                 path: 'build-load',
    //     //                 component: () =>
    //     //                     import ('@/views/qa/configManage'),
    //     //                 name: 'buildLoad',
    //     //                 meta: { title: '构建负载' }
    //     //             },
    //     //             {
    //     //                 path: 'pipeline',
    //     //                 component: () =>
    //     //                     import ('@/views/devops/pipeline'),
    //     //                 name: 'pipeline',
    //     //                 meta: { title: '流水线' },
    //     //             },
    //     //         ]
    //     //     },
    //     // ]
    // },
    {
        path: '/sys',
        name: 'sys',
        component: Layout,
        alwaysShow: true,
        redirect: '/sys/projectimport',
        meta: {
            title: '系统看板',
            icon: 'nested'
        },
        children: [
            {
                path: 'projectimport',
                name: 'projectimport',
                component: () => import('@/views/sys/ProjectImported.vue'),
                meta: { title: '项目导入看板' }
            },
            {
                path: 'use-condition',
                name: 'userCondition',
                component: () => import('@/views/sys/UserUsage.vue'),
                meta: { title: '用户使用情况' }
            }
        ]
    },
    // {
    //     path: '/documentation',
    //     component: Layout,
    //     redirect: 'noRedirect',
    //     alwaysShow: true,
    //     name: 'Documentation',
    //     meta: { title: '数据录入', icon: 'edit', affix: true },
    //     children: [
    //         // {
    //         //     path: 'CarSupplement',
    //         //     name: 'CarSupplement',
    //         //     component: () =>
    //         //         import ('@/views/data/carDispose/carSupplement/'),
    //         //     meta: { title: '智能汽车项目' }
    //         // },
    //     ]
    // },
    // {
    //     path: '/systemConfiguration',
    //     component: Layout,
    //     redirect: 'noRedirect',
    //     alwaysShow: true,
    //     name: 'systemConfiguration',
    //     meta: { title: '系统配置', icon: 'skill', affix: true },
    //     children: [
    //         {   path: 'ai-car-config',
    //             component: () =>
    //                 import ('@/views/sys/Index'),
    //             name: 'ai-car-config',
    //             redirect: '/ai-car-config/Index',
    //             alwaysShow: true,
    //             meta: { title: '智能汽车' },
    //             children: [
    //                 // {
    //                 //     path: 'carDispose',
    //                 //     name: 'Dispose',
    //                 //     component: () =>
    //                 //         import ('@/views/data/carDispose/index'),
    //                 //     meta: { title: '项目管理看板' }
    //                 // }
    //             ]
    //         },
    //         // {
    //         //     path: 'mark',
    //         //     name: 'mark',
    //         //     component: () =>
    //         //         import ('@/views/data/mark'),
    //         //     meta: { title: '质量KPI' }
    //         // },
    //         // {
    //         //     path: 'deliver',
    //         //     name: 'deliver',
    //         //     component: () =>
    //         //         import ('@/views/data/deliver'),
    //         //     meta: { title: '持续交付KPI' }
    //         // }
    //     ]
    // },
    // {
    //     path: '/reportMonth',
    //     component: Layout,
    //     redirect: 'noRedirect',
    //     alwaysShow: true,
    //     name: 'reportMonth',
    //     meta: { title: '统计报告', icon: 'excel', affix: true },
    //     children: [
            // {
            //     path: 'report',
            //     name: 'report',
            //     component: () => import('@/views/report/report'),
            //     meta: { title: '持续交付月报' }
            // },
            // {
            //     path: 'reportKpi',
            //     name: 'ReportKpi',
            //     component: () => import('@/views/report/qualityKpi/report'),
            //     meta: { title: '质量KPI月报' }
            // },
        // ]
    // },
    {
        path: '/project_request',
        component: Layout,
        redirect: '/profile/index',
        meta: {
            title: '项目管理',
            icon: 'form'
        },
        children: [
            {
                path: 'project-index',
                component: () => import('@/views/project_request/index'),
                name: 'create',
                meta: { title: '立项申请 - 项目类', noCache: true }
            },
            {
                path: 'change/:id',
                component: () => import('@/views/project_request/index'),
                name: 'change'
            },
            {
                path: 'change/',
                component: () => import('@/views/project_request/changeProject'),
                name: 'change',
                meta: { title: '变更申请 - 项目类', noCache: true }
            },
            {
                path: 'main/:id/:subProjectId',
                component: () =>
                    import('@/views/project_request/subProjectView'),
                name: 'subProject'
            },
            {
                path: 'main/:id',
                component: () => import('@/views/project_request/projectView'),
                name: 'parentProject'
            },
            {
                path: 'main',
                component: () =>
                    import('@/views/project_request/parentProjectList'),
                name: 'parentProjectList',
                meta: { title: '项目集', noCache: true }
            },
            {
                path: 'workinghour',
                name: 'WorkingHour',
                component: () => import('@/views/report/workinghour'),
                meta: { title: '项目信息表' }
            },
            {
                path: 'major-projects',
                component: () => import('@/views/project_request/projectList'),
                name: 'list',
                meta: { title: '我的项目', noCache: true }
            },
            {
                path: 'view/:id',
                component: () => import('@/views/project_request/index'),
                name: 'view'
            },
            {
                path: 'edit/:id',
                component: () => import('@/views/project_request/index'),
                name: 'edit'
            },
        ]
    },
    {
        path: '/resource-manage',
        component: Layout,
        redirect: '/resourceManage/index',
        alwaysShow: true,
        meta: {
            title: '资源管理',
            icon: 'form'
        },
        children: [
            {
                path: 'resourceForecast',
                component: () => import('@/views/resourceManage/index'),
                name: 'resourceForecast',
                meta: { title: '资源预测(PM)', noCache: true }
            },
            {
                path: 'resourceRequire',
                component: () => import('@/views/resourceManage/requirement'),
                name: 'resourceRequire',
                meta: { title: '资源看板(部门经理)', noCache: true }
            },
            {
                path: 'talentReview',
                component: () => import('@/views/resourceManage/talentReview'),
                name: 'talentReview',
                meta: { title: '人员盘点(部门经理)', noCache: true }
            },
            // {
            //     path: 'carForms',
            //     component: () => import('@/views/resourceManage/carForms'),
            //     name: 'carForms',
            //     meta: { title: '资源报表', noCache: true }
            // },
            {
                path: 'GAPForms',
                component: () => import('@/views/resourceManage/GAPForms'),
                name: 'GAPForms',
                meta: { title: '资源GAP报表', noCache: true }
            },
            {
                path: 'tagConfig',
                component: () => import('@/views/resourceManage/tagConfig'),
                name: 'tagConfig',
                meta: { title: '基础数据', noCache: true }
            },
            {
                path: 'specialTech',
                component: () => import('@/views/resourceManage/specialTech'),
                name: 'specialTech',
                meta: { title: '自定义标签', noCache: true }
            },
            {
                path: 'resourceCreate',
                component: () =>
                    import('@/views/resourceManage/resourceDetail'),
                name: 'resourceCreate'
            },
            {
                path: 'resourceView/:id',
                component: () =>
                    import('@/views/resourceManage/resourceDetail'),
                name: 'resourceView'
            },
            {
                path: 'resourceEdit/:id',
                component: () =>
                    import('@/views/resourceManage/resourceDetail'),
                name: 'resourceEdit'
            },
            {
                path: 'gapSum',
                component: () => import('@/views/resourceManage/gapSum'),
                name: 'gapSum',
                meta: { title: '资源看板-业务维度', noCache: true }
            },
            {
                path: 'resourceSum',
                component: () => import('@/views/resourceManage/resourceSum'),
                name: 'resourceSum',
                meta: { title: '资源看板-资源维度', noCache: true }
            },
        ]
    }
];
const createRouter = () =>
    new Router({
        // mode: 'history', // require service support
        scrollBehavior: () => ({ y: 0 }),
        routes: constantRoutes
    });
const router = createRouter();
export function resetRouter() {
    const newRouter = createRouter();
    router.matcher = newRouter.matcher; // reset router
}
export default router;
